import com.Lyy.entity.Course;
import com.Lyy.entity.Teacher;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Text {
    @Test
    public void Text1() {
        ApplicationContext AContext = new ClassPathXmlApplicationContext("Bean.xml");
        Teacher teacher1 = AContext.getBean("Teacher", Teacher.class);
        System.out.println(teacher1);
        teacher1.tsc();
    }
    @Test
    public void Text2(){
        ApplicationContext Context = new ClassPathXmlApplicationContext("Bean.xml");
        Course course1 = Context.getBean("Course", Course.class);
        course1.cc();
    }

}
